package com.seashop.feign.fallback;

import com.seashop.feign.ManageFeignClient;
import feign.hystrix.FallbackFactory;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

/**
 * @author moredln
 * @desc
 * @date 2020-08-08 00:19
 */
@Component
@Slf4j
public class ManageFeignClientFallBack implements FallbackFactory<ManageFeignClient> {

    @Override
    public ManageFeignClient create(Throwable throwable) {
        return new ManageFeignClient() {

            @Override
            public String getSystemConfig(String key) {
                log.info("调用管理系统配置文件失败");
                return null;
            }

        };
    }

}
